package com.sgb.auction.adapter;

import android.content.Context;
import android.widget.TextView;
import com.sgb.auction.BR;
import com.sgb.auction.R;
import com.sgb.auction.entity.AuctionRecordEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;
import java.util.List;

/**
 * Time:2021/11/22
 * AUTHOR:F_Q
 * Description:
 */
public class AllOfferAdapter  extends BaseRecycleAdapter<AuctionRecordEntity> {
    public AllOfferAdapter(Context context, List<AuctionRecordEntity> datas) {
        super(context, R.layout.all_offer_items, datas);
    }

    @Override
    public void onBindViewHolder(ItemViewHolder holder, int position) {
        super.onBindViewHolder(holder, position);
        TextView indexs = holder.itemView.findViewById(R.id.index);
        indexs.setText((position+1)+"");
    }

    @Override
    public void convert(ItemViewHolder holder, AuctionRecordEntity entity) {
        holder.setBinding(BR.viewModel, entity);
    }
}
